import { _decorator, Component, Node } from 'cc';
import { PieceManagerBase } from './PieceManagerBase';
const { ccclass, property } = _decorator;

@ccclass('NodeController')
export class NodeController extends Component {
    isOwned: boolean = false;
    owner: PieceManagerBase = null;
    start() {

    }

    
    ownNode(owner: PieceManagerBase){
        if(!this.isOwned){
            this.isOwned = true;
            this.owner = owner;
        }else{
            this.isOwned = true;
            this.owner = owner;
        }
    }

    clearNode(){
        this.isOwned = false;
        this.owner = null;
    }
    

    update(deltaTime: number) {
        
    }
}

